package org.example.seckilljava.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.example.seckilljava.entity.Order;

@Mapper
public interface OrderMapper extends BaseMapper<Order> {
    @Insert("insert into t_order(`seller`,`buyer`,`order_num`,`goods_id`, `goods_num`, `num`,`price`, `status`)" +
            "values (#{order.seller},#{order.buyer},#{order.orderNum},#{order.goodsId},#{order.goodsNum},#{order.num},#{order.price},#{order.status})")
    void save(@Param("order") Order order);
}